<%--
  Created by IntelliJ IDEA.
  User: Sssller
  Date: 2021/1/25
  Time: 18:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Title</title>
    <!-- Bootstrap -->
    <link href="${pageContext.request.contextPath}/static/boostrap/css/bootstrap.css" rel="stylesheet">

    <style>
        body{
            font-size: 18px;
        }
    </style>
</head>

<body>
<div class="container-fluid">
    <ol class="breadcrumb">
        <li><a href="#">首页</a></li>
        <li class="active">UmsAdmin</li>
    </ol>
    <div class="panel  panel-info">
        <div class="panel-heading">
            条件查询
        </div>

        <div class="panel-body">
            <form   class="form-inline" action="${pageContext.request.contextPath}/UmsAdmin/search" method="post" >

                <div  class="form-group">
                    <label>用户名</label>
                    <input name="username" type="text" class="form-control">
                </div>
                <div  class="form-group">
                    <label>账号启用状态</label>
                    <input name="status" type="radio" class="form-control" value="1">启用
                    <input name="status" type="radio" class="form-control" value="0">禁用
                </div>

                <input type="submit" value="搜索" class="btn btn-primary" />

                <a class="btn btn-success" href="${pageContext.request.contextPath}/UmsAdmin/insert">添加数据</a>
            </form>
        </div>
    </div>
    <table class="table table-hover table-bordered">
        <tr>
            <td>编号</td>
            <td>用户名</td>
            <td>密码</td>
            <td>头像</td>
            <td>邮箱</td>
            <td>昵称</td>
            <td>备注信息</td>
            <td>创建时间</td>
            <td>最后登陆时间</td>
            <td>账号启用状态</td>
            <td>供应商</td>
            <td>操作</td>
        </tr>
    <c:forEach items="${id}" var="p">
        <tr>
            <td>${p.id}</td>
            <td>${p.username}</td>
            <td>${p.password}</td>
            <td>${p.icon}</td>
            <td>${p.email}</td>
            <td>${p.nickName}</td>
            <td>${p.note}</td>
            <td>
                <fmt:formatDate value="${p.createTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
            </td>
            <td>
                <fmt:formatDate value="${p.loginTime}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate>
            </td>
            <td>
                <c:if test="${p.status==0}">禁用</c:if>
                <c:if test="${p.status==1}">启用</c:if>
            </td>
            <td>${p.supplyId}</td>
            <td>
                <a href="${pageContext.request.contextPath}/UmsAdmin/update?id=${p.id}">
                    编辑
                </a>
            </td>
        </tr>
    </c:forEach>
    </table>
</div>
</body>
</html>
